<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>13-清除闹钟定时器</title>
	</head>
	<body>
		<button>清除</button>
		<script type="text/javascript">
			//clearInterval()
			var timer = setInterval(function(){
				console.log('李宝莉');
			},1000);
			
			document.querySelector('button').onclick=function(){
				clearInterval(timer);
			}
			
		</script>
	</body>
</html>
